package com.aos.iot.socket.common.scheduler;

import io.netty.channel.ChannelHandlerContext;

import java.util.concurrent.TimeUnit;

public interface CancelableScheduler {

    void update(ChannelHandlerContext ctx);

    void cancel(String key);

    void scheduleCallback(String key, Runnable runnable, long delay, TimeUnit unit);

    void schedule(Runnable runnable, long delay, TimeUnit unit);

    void schedule(String key, Runnable runnable, long delay, TimeUnit unit);

    void shutdown();
}
